package com.share.domain.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * author:caifan
 * date:2020/1/2
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RestResponse implements Serializable {
    private static final long serialVersionUID = -8574522644298027458L;
    private String code;
    private String message;
    private String traceId;
    private long timestamp = System.currentTimeMillis();

    public RestResponse(String message) {
        this.message = message;
    }

    public RestResponse(String code, String message, String traceId) {
        this.code = code;
        this.message = message;
        this.traceId = traceId;
    }

    public RestResponse(String message, String traceId) {
        this.message = message;
        this.traceId = traceId;
    }
}
